package com.quad.innovators.salesease.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quad.innovators.salesease.model.bo.SysUserBO;
import com.quad.innovators.salesease.model.dto.SysUserAuthInfo;
import com.quad.innovators.salesease.model.dto.SysUserExportDTO;
import com.quad.innovators.salesease.model.entity.SysUser;
import com.quad.innovators.salesease.model.form.SysUserForm;
import com.quad.innovators.salesease.model.query.SysUserPageQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户mapper
 */
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 获取用户分页列表
     *
     * @param page
     * @param queryParams 查询参数
     * @return
     */
    Page<SysUserBO> listPagedUsers(Page<SysUserBO> page, @Param("queryParams") SysUserPageQuery queryParams);

    /**
     * 获取用户表单详情
     *
     * @param userCode 用户ID
     * @return
     */
    SysUserForm getUserFormData(@Param("userCode") String userCode);

    /**
     * 根据用户名获取认证信息
     *
     * @param telephone
     * @return
     */
    SysUserAuthInfo getUserAuthInfo(@Param("telephone") String telephone);

    /**
     * 获取导出用户列表
     *
     * @param queryParams
     * @return
     */
    List<SysUserExportDTO> listExportUsers(@Param("queryParams") SysUserPageQuery queryParams);

    /**
     * 获取用户个人中心信息
     *
     * @param userId 用户ID
     * @return
     */
    SysUserBO getUserProfile(@Param("userId") Long userId);
}